home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / PlayModule.filer < prev    next >
Text File  |  1996-09-26  |  1KB  |  66 lines

  1. /* 
  2.  
  3.    $VER: PlayModule.filer 2.3 (2.4.95)
  4.  
  5.    Author:
  6.     Matthias Scheler (tron@lyssa.owl.de)
  7.  
  8.    Function:
  9.     Tells DeliTracker via ARexx to play the module supplied as argument.
  10.     If DeliTracker is not running it's loaded automatically and the window
  11.     is placed on Filer's screen.
  12.  
  13.    Requires:
  14.     2.3   removed unnecessary ADDRESS 'FilerRexx'
  15.  
  16.    Requires:
  17.     DeliTracker 2.01 or newer
  18.  
  19.    Call:
  20.     PlayModule FILENAME
  21.  
  22.    Example for "Filer.RC":
  23.     REXXCLASS "MOD.#?","","PlayModule %s"
  24.  
  25. */
  26.  
  27. PARSE ARG FileName
  28.  
  29. ADDRESS 'FilerRexx'
  30. OPTIONS RESULTS
  31.  
  32. GETSCREENNAME
  33. IF RESULT="RESULT" THEN EXIT 5
  34. ScreenName=RESULT
  35.  
  36. GETSOURCEPATH
  37. IF RESULT="RESULT" THEN EXIT 5
  38. SourceDir=RESULT
  39.  
  40. IF RIGHT(SourceDir,1)=":" THEN SourceName=SourceDir||FileName
  41. ELSE SourceName=SourceDir||"/"||FileName
  42.  
  43. PANEL OFF
  44.  
  45. IF ~SHOW('Ports','DELITRACKER') THEN
  46.  DO
  47.   'STATUS Loading DeliTracker II ...'
  48.  
  49.   'EXEC Run >NIL: DeliTracker2 >NIL: PUBSCREEN' ScreenName
  50.   ADDRESS 'COMMAND' 'SYS:Rexxc/WaitForPort DELITRACKER'
  51.  
  52.   IF ~SHOW('Ports','DELITRACKER') THEN
  53.    DO
  54.     "HISTORY Can't load DeliTracker II."
  55.     PANEL ON
  56.  
  57.     EXIT 10
  58.    END
  59.  END
  60.  
  61. 'STATUS Loading module "'||SourceName||'" into DeliTracker II.'
  62.  
  63. ADDRESS 'DELITRACKER' 'PLAYMOD '||SourceName
  64.  
  65. PANEL ON
  66.